{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>请登录</title>
    <link rel="stylesheet" href="{% static 'css/bootstrap.css' %}">
    <link rel="stylesheet" href="{% static 'css/login.css' %}">
</head>

<body>
	<h1>智投基金模拟操作平台</h1>
	<div class="w3ls-login box box--big">
		<!-- form starts here -->
		<form action="../login/" method="post">
            {% csrf_token %}
			<div class="agile-field-txt">
				<label >
					<i class="fa fa-user" aria-hidden="true"></i> 账号 </label>
				<input type="text" name="username" placeholder="请输入管理员账号" required="" />
			</div>
			<div class="agile-field-txt">
				<label>
					<i class="fa fa-envelope" aria-hidden="true"></i> 密码 </label>
				<input type="password" name="password" placeholder="请输入管理员密码" required="" id="myInput" />
				<div class="agile_label">
					<input id="check3" name="check3" type="checkbox" value="show password" onclick="myFunction()">
					<label class="check" for="check3">显示密码</label>
				</div>
			</div>

			<div class="w3ls-bot">

				<div class="form-end">
					<input type="submit" value="登录" style="font-size: 15px">
				</div>
				<div class="clearfix"></div>
                {% if error == 1 %}
                    <p style="font-size: 25px;color: red">密码错误</p>
                {% else %}
                    <p style="font-size: 25px">&nbsp</p>
                {% endif %}
			</div>
		</form>

	</div>
	<!-- //form ends here -->

	<div class="copy-wthree">
		<p>软工2021 |
			<a href="http://www.buaa.edu.cn/" target="_blank">BUAA</a>
		</p>
	</div>


<script>
				function myFunction() {
					var x = document.getElementById("myInput");
					if (x.type === "password") {
						x.type = "text";
					} else {
						x.type = "password";
					}
				}
			</script>

</body>
</html>